<template>
  <div class="intelligence">
    <div class="intelligenceBanner">
      <img class="imtell_img" :src="list.img" alt="" />
      <div class="intell_cont">
        <h2>{{ list.titte }}</h2>
        <p>{{ list.english }}</p>
        <div v-html="list.content" id="bannerConent">{{ list.content }}</div>
        <el-button
          class="btn"
          :style="
            'border-color:' + list.buttonColour + '; color:' + list.buttonColour
          "
          >售前咨询</el-button
        >
        <el-button
          class="btn"
          v-if="useState"
          :style="
            'background:' + list.buttonColour + '; color: #fff;border:none'
          "
          @click="initPlat"
          >进入平台</el-button
        >
      </div>
    </div>
    <div class="introduce">
      <div class="content">
        <h2>介 绍</h2>
        <p>introduce</p>
        <div v-html="content.content" id="introduceContent">
          {{ content.content }}
        </div>
      </div>
    </div>
    <div class="value">
      <h2>价 值</h2>
      <p>value</p>
      <div class="valueList">
        <ul>
          <li v-for="(item, index) in value" :key="item.id">
            <div class="icon" style="text-align: center">
              <img v-if="index == 0" src="@/assets/icon/medal.png" />
              <img v-if="index == 1" src="@/assets/icon/Diamonds.png" />
              <img v-if="index == 2" src="@/assets/icon/shield.png" />
            </div>
            <h3>{{ item.img }}</h3>
            <div id="valueContent">
              <div class="value_icon">
                <div class="mark"></div>
                <div class="mark"></div>
                <div class="mark"></div>
              </div>
              <div class="value_text" v-html="item.content">
                {{ item.content }}
              </div>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'operate',
  props: {
    active: {
      type: String,
      default: () => {
        return '0'
      }
    },
    list: {
      type: Object,
      default: () => {
        return {}
      }
    },
    content: {
      type: Object,
      default: () => {
        return {}
      }
    },
    value: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  computed: {
    ...mapGetters(['useState'])
  },
  methods: {
    initPlat () {
      this.$router.push({ path: '/operation', query: { active: this.active } })
    },
    mouseenter (color) {
      this.$refs.btnColor.background = color
    },
    mouseleave () {
      this.$refs.btnColor.background = '#fff'
    }
  }
}
</script>

<style lang="scss" scoped>
/*智慧平台模块样式*/

.intelligence {
  .intelligenceBanner {
    width: 100%;
    height: 535px;
    overflow: hidden;
    position: relative;
    h2 {
      margin-top: 6%;
      font-size: 42px;
      color: #303133;
      line-height: 48px;
      font-weight: 400;
    }
    p {
      margin: 19px 0 28px;
      font-size: 24px;
      font-weight: 800;
      color: #303133;
      line-height: 28px;
      opacity: 0.5;
    }
    #bannerConent {
      width: 50%;
      height:160px;
      font-size: 14px;
      font-weight: 500;
      color: #666666;
      line-height: 38px;
      margin-bottom: 2%;
      text-overflow: ellipsis;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      line-clamp: 4;
      -webkit-box-orient: vertical;
    }
    .btn {
      width: 166px;
      height: 43px;
      margin-right: 70px;
      font-size: 16px;
      font-weight: bold;
      color: #0e7fe8;
      background: #ffffff;
      border: 1px solid #0e7fe8;
      &:hover {
        color: #fff;
      }
    }
  }
  .introduce {
    padding-bottom: 65px;
    background: #f8f9fb;
    .content {
      width: 74%;
      margin: 0 auto;
      overflow: hidden;
      h2 {
        margin: 70px 0 18px;
        font-size: 34px;
        font-weight: bold;
        color: #061a43;
        line-height: 28px;
        text-align: center;
      }
      p {
        font-size: 15px;
        font-weight: 500;
        color: #8a92a1;
        line-height: 28px;
        text-align: center;
      }
      #introduceContent {
        margin-top: 49px;
        font-size: 14px;
        font-weight: 500;
        color: #666666;
        line-height: 38px;
        // text-overflow: ellipsis;
        // overflow: hidden;
        // display: -webkit-box;
        // -webkit-line-clamp: 10;
        // line-clamp: 10;
        // -webkit-box-orient: vertical;
      }
    }
  }
  .value {
    h2 {
      margin: 70px 0 18px;
      font-size: 34px;
      font-weight: bold;
      color: #061a43;
      line-height: 28px;
      text-align: center;
    }
    p {
      font-size: 15px;
      font-weight: 500;
      color: #8a92a1;
      line-height: 28px;
      text-align: center;
    }
    #valueContent {
      width: 100%;
      height: 200px;
      position: relative;
      padding-left: 25%;
      font-size: 16px;
      font-weight: 500;
      color: #333333;
      line-height: 30px;
      overflow: hidden;
      -webkit-box-orient: vertical;
      display: flex;
      flex-direction: row;
      .value_icon {
        width: 20px;
        height: 200px;
      }
      .mark {
        width: 10px;
        height: 10px;
        background: #29c19b;
        transform: rotate(45deg);
        &:nth-child(1){
         margin-top: 40px;
        }
        &:nth-child(2){
         margin-top: 50px;
        }
        &:nth-child(3){
         margin-top: 50px;
        }
      }
      .value_text {
        width: 90%;
        height: 185px;
        margin: 0 25px;
        text-overflow: ellipsis;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 6;
        line-clamp: 6;
        -webkit-box-orient: vertical;
      }
    }
    .valueList {
      width: 74%;
      margin: 0 auto;
      ul {
        display: flex;
        li {
          width: 100%;
          height: 410px;
          margin: 69px 30px 105px 0;
          padding: 20px;
          background: #ffffff;
          box-shadow: 0px 1px 10px 0px rgba(27, 72, 74, 0.11);
          cursor: pointer;
          transition: all 0.2s ease-in;
          &:hover {
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
            transform: translate3d(0, -10px, -2px);
            h3 {
              color: #0e7fe8;
            }
          }
          &:nth-child(2) .icon {
            background: rgba(14, 127, 232, 0.1);
          }
          &:last-child .icon {
            background: rgba(91, 81, 223, 0.1);
          }
          &:nth-child(2) #valueContent .mark {
            background: #0e7fe8;
          }
          &:last-child #valueContent .mark {
            background: #5b51df;
          }
          .icon {
            width: 64px;
            height: 64px;
            margin: 29px auto;
            background: rgba(41, 193, 155, 0.1);
            border-radius: 50%;
            img {
              height: 64%;
              margin: 22% auto;
            }
          }
          h3 {
            margin: 25px 0 38px;
            text-align: center;
            font-size: 20px;
            font-weight: bold;
            color: #333333;
          }
        }
      }
    }
  }
}
.intelligence {
  .intelligenceBanner {
    position: relative;
    // background: url('../../assets/image/intelligenceBanner.png') no-repeat;
    background-size: cover;
    .imtell_img {
      width: 100%;
      height: 100%;
      position: absolute;
    }
    .intell_cont {
      width: 74%;
      position: absolute;
      left: 50%;
      margin-left: -37%;
    }
  }
}
</style>
